package team.freeroom.hotelmanage.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import team.freeroom.hotelmanage.repository.entity.Authority;
import team.freeroom.hotelmanage.repository.mapper.AuthorityMapper;
import team.freeroom.hotelmanage.service.AuthorityService;
import java.util.List;

@Service
public class AuthorityServiceImpl implements AuthorityService {
    @Autowired
    private AuthorityMapper authorityMapper;

    @Override
    public int add(Authority authority) {
        return authorityMapper.add(authority);
    }

    @Override
    public int deleteByRoleId(Long roleId) {
        return authorityMapper.deleteByRoleId(roleId);
    }

    @Override
    public List<Authority> findListByRoleId(Long roleId) {
        return authorityMapper.findListByRoleId(roleId);
    }
}
